<div class="edit clearfix" id="widget_preference_DIV_1">
	<div class="col" id="widget_preference_DIV_2">
		<h3 id="widget_preference_H3_3">
			I'm here to:
		</h3>
		<ul id="widget_preference_UL_4">
			<li id="widget_preference_LI_5">
                <?php $checked = $search_purpose_id == 0 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_6" name="purpose_of_search" value="0" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_6" id="widget_preference_LABEL_9">
					Make new friends
				</label>
			</li>
			<li id="widget_preference_LI_10">
                <?php $checked = $search_purpose_id == 1 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_11" name="purpose_of_search" value="1" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_11" id="widget_preference_LABEL_14">
					Chat
				</label>
			</li>
			<li id="widget_preference_LI_15">
                <?php $checked = $search_purpose_id == 2 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_16" name="purpose_of_search" value="2" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_16" id="widget_preference_LABEL_19">
					Date
				</label>
			</li>
		</ul>
	</div>
	<div class="col" id="widget_preference_DIV_20">
		<h3 id="widget_preference_H3_21">
			Show me:
		</h3>
		<ul id="widget_preference_UL_22">
			<li id="widget_preference_LI_23">
                <?php $checked = $preference['interest_id'] == 0 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_24" name="show_me" value="0" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_24" id="widget_preference_LABEL_27">
					New people
				</label>
			</li>
			<li id="widget_preference_LI_28">
                <?php $checked = $preference['interest_id'] == 1 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_29" name="show_me" value="1" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_29" id="widget_preference_LABEL_32">
					Friends
				</label>
			</li>
			<li id="widget_preference_LI_33">
                <?php $checked = $preference['interest_id'] == 2 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_34" name="show_me" value="2"<?php echo $checked ?> />
				<label for="widget_preference_INPUT_34" id="widget_preference_LABEL_37">
					Friends of Friends
				</label>
			</li>
		</ul>
	</div>
	<div class="col twocol" id="widget_preference_DIV_38">
		<h3 id="widget_preference_H3_39">
			Gender &amp; age:
		</h3>
		<ul id="widget_preference_UL_40">
			<li id="widget_preference_LI_41">
                <?php $checked = $preference['gender_id'] == 1 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_42" name="gender" value="1" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_42" id="widget_preference_LABEL_45">
					Guys
				</label>
			</li>
			<li id="widget_preference_LI_46">
                <?php $checked = $preference['gender_id'] == 0 ? 'checked="checked"' : '' ?>
				<input type="radio" id="widget_preference_INPUT_47" name="gender" value="0" <?php echo $checked ?> />
				<label for="widget_preference_INPUT_47" id="widget_preference_LABEL_50">
					Girls
				</label>
			</li>
            <br />
			<li id="widget_preference_LI_51">
				<select name="age_from" id="widget_preference_SELECT_52">
					<?php for($age = 16; $age <= 50; $age++): ?>
                    <?php $selected = $age == $preference['age_from'] ? 'selected' : '' ?>
                    <option value="<?php echo $age ?>" <?php echo $selected; ?>><?php echo $age ?></option>
                    <?php endfor; ?>
                </select>
			</li>
			<li id="widget_preference_LI_91">
				-
			</li>
			<li id="widget_preference_LI_92">
                <select name="age_to" id="widget_preference_SELECT_93">
					<?php for($age = 17; $age <= 80; $age++): ?>
                    <?php $selected = $age == $preference['age_to'] ? 'selected' : '' ?>
                    <option value="<?php echo $age ?>" <?php echo $selected; ?>><?php echo $age ?></option>
                    <?php endfor; ?>
                </select>
			</li>
		</ul>
	</div>
	<div class="col last" id="widget_preference_DIV_153">
		<div class="range" id="widget_preference_DIV_154">
			<div id="widget_preference_DIV_155">
				<input type="text" name="location-city" id="widget_preference_INPUT_156" />
			</div>
			<h3 id="widget_preference_H3_157">
				Where
			</h3>
			<div id="widget_preference_DIV_158">
                <h4 id="widget_preference_H4_163">
							Ho Chi Minh City
                </h4>
                <select name="distance">
                    <?php for($distance = 100; $distance <= 500; $distance+=100): ?>
                    <?php $selected = $distance == $preference['distance'] ? 'selected' : '' ?>
                    <option value="<?php echo $distance ?>" <?php echo $selected; ?>><?php echo $distance ?></option>
                    <?php endfor; ?>
				</select>
                <br />
                <a href="#" id="widget_preference_A_164" title="Change to another city">Change to another city</a>
			</div>
		</div>
	</div> <a href="javascript:void(0)" id="widget_preference_A_183" class="btn-find" title="Find People">Save</a>
</div>

<script type="text/javascript">
    PHP_PARAMS.perference_widget = new Object();
    PHP_PARAMS.perference_widget.ajaxUrl = '<?php echo $ajax_url ?>';
</script>